<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center myPage_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub myPage_fd0_0'>
					<view class='flex flex-wrap align-center myPage_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/grzx/myNews/myNews`">
						<image class='myPage_fd0_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"484.png"'></image>
						<benben-message-num class='myPage_fd0_0_c0_c1' size='20' color='#FFF' :messageNum="newsNums"
							background-color='#D5252A'>
						</benben-message-num>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text style="font-size: 36rpx;font-weight: 500;color: #fff;">个人中心</text>
					</view>
					<view class='flex flex-wrap align-center justify-end myPage_fd0_0_c2'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

			<view class="flex benben-flex-layout flex-wrap align-center">
				<view class='flex flex-direction flex-wrap align-stretch flex-sub myPage_fd1_0'>
					<view class='flex flex-direction flex-wrap align-stretch justify-between myPage_fd1_0_c0'>
						<view class='flex align-center justify-end myPage_fd1_0_c0_c0' v-if="isLogin===true"
							@tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pages/grzx/myInfo/myInfo`">
							<image class='myPage_fd1_0_c0_c0_c0' mode="aspectFill" :src='userInfo.head_img'></image>
							<view class='flex flex-direction flex-wrap align-start flex-sub'>
								<text class='flex-sub myPage_fd1_0_c0_c0_c1_c0'>{{userInfo.user_nickname}}</text>
							</view>
							<image class='myPage_fd1_0_c0_c0_c2' mode="aspectFill" :src='STATIC_URL+"727.png"'></image>
						</view>
						<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pages/tabBar/passwordLogin/passwordLogin`" v-if="isLogin===false">
							<image class='myPage_fd1_0_c0_c1_c0' mode="aspectFill" :src='STATIC_URL+"641.png"'></image>
							<view class='flex flex-direction flex-wrap align-center'>
								<text class='flex-sub myPage_fd1_0_c0_c1_c1_c0'>请登录</text>
							</view>
						</view>
					</view>
				</view>
			</view>

			<!---服务功能flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPage_flex_2" v-if="isLogin && userInfo.is_vip == 1">
				<view class='flex flex-wrap align-center justify-between myPage_fd2_1'>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/sousuo/punchinTasks/punchinTasks`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"50.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>签到</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/grzx/inteGral/inteGral`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"51.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>积分商城</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/yhq/couponMy/couponMy`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"52.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>优惠券</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/shouye/oneAppointment/myAppointment`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"53.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>我的预约</text>
					</view>
				</view>
			</view>
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPage_flex_2" v-else>
				<view class='flex flex-wrap align-center justify-between myPage_fd2_1' style="padding: 0 120rpx;">
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/yhq/couponMy/couponMy`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"52.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>优惠券</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/shouye/oneAppointment/myAppointment`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"53.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>我的预约</text>
					</view>
				</view>
			</view>

			<view class="vip" @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/xitongs/member/member`">
				<view class="vip_content">
					<image :src='STATIC_URL+"509.png"' mode="aspectFill"></image>
				</view>
				<view class="vip_button">
					<text>查看详情</text>
					<image :src='STATIC_URL+"510.png"' mode="aspectFill"></image>
				</view>
			</view>
			<view class="order_info">
				<view class="order_title" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/ddgl/order/order?type=all`">
					<view class="order_title_1">商城订单</view>
					<view class="order_title_2">
						<text>全部订单</text>
						<u-icon size="24" color="#999" name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="flex align-center justify-between" style="padding: 0 24rpx;">
					<view class="order_item" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/ddgl/order/order?type=unpay`">
						<image :src='STATIC_URL+"54.png"' mode="aspectFill"></image>
						<view>待付款</view>
						<view class="order_num" v-if="total_nums.unpay_num > 0">
							<text>{{total_nums.unpay_num}}</text>
						</view>
					</view>
					<view class="order_item" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/ddgl/order/order?type=unreceive`">
						<image :src='STATIC_URL+"56.png"' mode="aspectFill"></image>
						<view>进行中</view>
						<view class="order_num" v-if="total_nums.undelivery_num > 0">
							<text>{{total_nums.undelivery_num}}</text>
						</view>
					</view>
					<view class="order_item" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/ddgl/order/order?type=finish`">
						<image :src='STATIC_URL+"57.png"' mode="aspectFill"></image>
						<view>待评价</view>
						<view class="order_num" v-if="total_nums.unevaluate_num > 0">
							<text>{{total_nums.unevaluate_num}}</text>
						</view>
					</view>
					<view class="order_item" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/ddgl/order/order?type=6`">
						<image :src='STATIC_URL+"58.png"' mode="aspectFill"></image>
						<view>售后</view>
						<view class="order_num" v-if="total_nums.refund_num > 0">
							<text>{{total_nums.refund_num}}</text>
						</view>
					</view>
				</view>
			</view>

			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPage_flex_2"
				style="margin-top: 20rpx;">
				<view class='flex flex-wrap align-center justify-between myPage_fd2_1'>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/yhq/InviteFriends/InviteFriends`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"59.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>分享邀请</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/yhq/InviteFriends/myInvite`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"60.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>我的邀请</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/xitongs/ContactUs/ContactUs`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"61.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>联系我们</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/yhq/myCollections/myCollections`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"62.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>商品收藏</text>
					</view>
					<view style="margin-top: 32rpx;" class='flex flex-direction flex-wrap align-center myPage_fd2_1_c0'
						@tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/xitongs/settingsPage/settingsPage`">
						<image class='myPage_fd2_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"63.png"'></image>
						<text class='myPage_fd2_1_c0_c1'>设置</text>
					</view>
				</view>
			</view>

			<!---服务功能flex布局结束-->
			<!---flex布局flex布局开始-->
			<!-- <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPage_flex_3">
				<view class='flex flex-direction flex-wrap align-stretch myPage_fd3_0'>
					<view class='flex flex-wrap align-center myPage_fd3_0_c0'>
						<image class='myPage_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"627.png"'></image>
						<text class='myPage_fd3_0_c0_c1' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">邀请好友</text>
						<image class='myPage_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"632.png"'></image>
					</view>
					<view class='flex flex-wrap align-center myPage_fd3_0_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/xitongs/helpCente/helpCente`">
						<image class='myPage_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"628.png"'></image>
						<text class='myPage_fd3_0_c0_c1'
							style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">帮助中心</text>
						<image class='myPage_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"632.png"'></image>
					</view>
					<view class='flex flex-wrap align-center myPage_fd3_0_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/xitongs/ContactUs/ContactUs`">
						<image class='myPage_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"629.png"'></image>
						<text class='myPage_fd3_0_c0_c1'
							style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">联系我们</text>
						<image class='myPage_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"632.png"'></image>
					</view>
					<button class='flex flex-wrap align-center myPage_fd3_0_c0' style="background-color: transparent;"
						open-type="contact">
						<image class='myPage_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"630.png"'></image>
						<text class='myPage_fd3_0_c0_c1'
							style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">联系客服</text>
						<image class='myPage_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"632.png"'></image>
					</button>
					<view class='flex flex-wrap align-center myPage_fd3_0_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/xitongs/settingsPage/settingsPage`">
						<image class='myPage_fd3_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"631.png"'></image>
						<text class='myPage_fd3_0_c0_c1'
							style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">系统设置</text>
						<image class='myPage_fd3_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"632.png"'></image>
					</view>
				</view>
			</view> -->

			<!---flex布局flex布局结束-->
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"newsNums": 0,
				"total_nums": {},
				"userInfo": {
					"invite_code": "",
					"address": "",
					"address_code": "",
					"hobby": "",
					"tags": "",
					"id": "",
					"lastid": "",
					"userlevel_id": "",
					"mobile": "",
					"real_name": "",
					"nickname": "",
					"avatar": "",
					"account": "",
					"email": "",
					"birthday": "",
					"gender": "",
					"create_time": "",
					"user_money": "",
					"freeze_money": "",
					"total_consumption_money": "",
					"score": "",
					"_mobile": "",
					"userlevel_name": "",
					"coupon": "",
					"collection_count": "",
					"browse_count": "",
					"follow_count": "",
					"total_money": "",
					"certified": "",
					"is_pay_password": "",
					"distributor_info": {
						"aid": "",
						"member_id": "",
						"uid": "",
						"create_time": "",
						"update_time": "",
						"sort": "",
						"is_del": "",
						"status": "",
						"create_id": "",
						"row_lock": "",
						"user_id": "",
						"inviter_id": "",
						"dis_path": "",
						"total_bonus": "",
						"inviter_num": "",
						"group_num": "",
						"self_sales": "",
						"inviter_sales": "",
						"group_sales": "",
						"distributorlevel_id": "",
						"level_name": ""
					}
				}
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			isLogin() {
				return this.$store.state.token == '' ? false : true;
			}
		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			if (global.token) {
				this.getNewsNum();
				this.getOrderNum();
				this.getData();
			}

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 获取消息未读数  6553174f6dafa
			getNewsNum() {
				this.$api.post(global.API_VERSION + '6553174f6dafa', {

				}).then(res => {
					if (res.data.code == 1) {
						this.newsNums = res.data.data.total_nums;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 获取消息未读数  post6544e081d6826
			getOrderNum() {
				this.$api.post(global.apiUrls.post6544e081d6826, {

				}).then(res => {
					console.log(res);
					if (res.data.code == 1) {
						this.total_nums = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			//查询用户详细信息  5c78c4772da97
			getData() {
				this.$api.post(global.API_VERSION + '5c78c4772da97', {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.userInfo = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.vip {
		width: 702rpx;
		margin: 0 24rpx;
		height: 120rpx;
		background: url(https://yongzhixing.niurenjianzhan.com/uploads/mini/505.png) no-repeat;
		background-size: 100% 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 24rpx 0 143rpx;
		.vip_content {
			image {
				width: 352rpx;
				height: 38rpx;
			}
		}

		.vip_button {
			width: 152rpx;
			height: 50rpx;
			background: linear-gradient(63deg, #F7E2BF 0%, #E3BA99 100%);
			border-radius: 10rpx;
			color: #15212B;
			font-size: 24rpx;
			display: flex;
			align-items: center;
			justify-content: center;

			image {
				width: 12rpx;
				height: 12rpx;
				margin-left: 4rpx;
			}
		}
	}

	.order_info {
		background: #fff;
		border-radius: 16rpx;
		padding: 32rpx 24rpx;
		margin: 20rpx 24rpx 0;

		.order_title {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 32rpx;

			.order_title_1 {
				font-size: 28rpx;
				font-weight: 500;
			}

			.order_title_2 {
				display: flex;
				align-items: center;
				color: #999;
			}
		}

		.order_item {
			font-size: 24rpx;
			text-align: center;
			position: relative;

			image {
				width: 64rpx;
				height: 64rpx;
				margin-bottom: 16rpx;
			}

			.order_num {
				position: absolute;
				top: -4rpx;
				right: -8rpx;
				width: 28rpx;
				height: 28rpx;
				border-radius: 50%;
				background: #D5252A;
				font-size: 20rpx;
				text-align: center;
				line-height: 28rpx;
				color: #fff;
			}
		}
	}

	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://yongzhixing.niurenjianzhan.com/uploads/mini/503.png) no-repeat;
		background-size: 100% auto;
	}

	.myPage_flex_0 {
		background: url(https://yongzhixing.niurenjianzhan.com/uploads/mini/503.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.myPage_fd0_0_c2 {
		width: 80rpx;
	}

	.myPage_fd0_0_c0_c1 {
		position: absolute;
		top: -6rpx;
		right: 26rpx;
	}

	.myPage_fd0_0_c0_c0 {
		width: 40rpx;
		height: 38rpx;
	}

	.myPage_fd0_0_c0 {
		width: 80rpx;
		position: relative;
	}

	.myPage_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.myPage_fd1_0_c0_c1_c1_c0 {
		color: #FFFFFF;
		font-size: 36rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 17rpx 0rpx;
	}

	.myPage_fd1_0_c0_c1_c0 {
		width: 124rpx;
		height: 124rpx;
		border-radius: 63rpx;
		margin: 0rpx 38rpx 0rpx 0rpx;
	}

	.myPage_fd1_0_c0_c0_c2 {
		width: 30rpx;
		height: 30rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.myPage_fd1_0_c0_c0_c1_c0 {
		color: #FFFFFF;
		font-size: 36rpx;
		font-weight: 400;
		max-width: 300rpx;
		text-overflow: ellipsis;
		overflow: hidden;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		/* 这里是超出几行省略 */
	}

	.myPage_fd1_0_c0_c0_c0 {
		width: 124rpx;
		height: 124rpx;
		border-radius: 62rpx;
		margin: 0rpx 38rpx 0rpx 0rpx;
	}

	.myPage_fd1_0_c0_c0 {
		width: 100%;
	}

	.myPage_fd1_0_c0 {
		padding: 48rpx 27rpx 48rpx 0rpx;
	}

	.myPage_fd1_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.myPage_flex_2 {
		background: #fff;
		margin: 0rpx 24rpx 24rpx 24rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx;
		padding: 32rpx 0rpx 29rpx 0rpx;
	}

	.myPage_fd2_2 {
		margin: 0rpx 35rpx 43rpx 35rpx;
	}

	.myPage_fd2_1_c0_c1 {
		font-size: 24rpx;
		font-weight: 500;
		color: #333333;
		max-width: 160rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.myPage_fd2_1_c0_c0 {
		width: 76rpx;
		height: 76rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 14rpx 0rpx;
	}

	.myPage_fd2_1_c0 {
		width: 158rpx;
	}

	.myPage_fd2_1 {
		// margin: 0rpx 0rpx 35rpx 0rpx;
	}

	.myPage_fd2_0 {
		line-height: 45rpx;
		font-size: 38rpx;
		font-weight: 400;
		color: #333333;
		padding: 0rpx 30rpx 0rpx 30rpx;
		margin: 0rpx 0rpx 35rpx 0rpx;
	}

	.myPage_flex_3 {
		padding: 24rpx 30rpx 24rpx 30rpx;
	}

	.myPage_fd3_0_c0_c2 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.myPage_fd3_0_c0_c1 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
	}

	.myPage_fd3_0_c0_c0 {
		width: 40rpx;
		height: 40rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.myPage_fd3_0_c0 {
		padding: 0rpx 24rpx 0rpx 24rpx;
		line-height: 104rpx;
	}

	.myPage_fd3_0 {
		background: #fff;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		background-size: 100% auto !important;
	}
</style>